package salesforce.maximumstrak;

//有多少个连续的全员日
public class Solution {
    public int maximumStrak(String[] records) {
        int curr = 0;
        int max = 0;
        for (int i = 0; i < records.length; i++) {
            if (check(records[i])){
                curr++;
            }else {
                max = Math.max(max,curr);
                curr = 0;
            }
        }
        return max;
    }

    private boolean check(String s) {
        for (char c : s.toCharArray()) {
            if (c == 'N') {
                return false;
            }
        }
        return true;
    }

}
